// pages/vipcd/vipcd.js
var app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
  
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.getData()
  },

  getData(){
    var that = this;
    wx.request({
      url: app.globalData.host + 'index.php/api/goods/classify?admin_id=' + app.globalData.admin_id + '&parent_id=' + 67210,
      success: function (e) {
        that.setData({
          items: e.data.data
        })
      }
    })
  },

  tocard(e){
    if (e.currentTarget.dataset.id == 67211){
      wx.navigateTo({
        url: '../../pages/card1/card1',
      })
    }
    if (e.currentTarget.dataset.id == 67212) {
      wx.navigateTo({
        url: '../../pages/card2/card2',
      })
    }
    if (e.currentTarget.dataset.id == 67213) {
      wx.navigateTo({
        url: '../../pages/card3/card3',
      })
    }
  }

  

})